/**
 * FileName: DictGroupTransfer
 * Author: zlz
 * CreatedDate: 2025/3/3 08:54:20
 * Description:
 * Version: 1.0.0
 */
package com.zlz.open.dict.bean.transfer;

import com.zlz.open.dict.bean.dos.DictGroupEntity;
import com.zlz.open.dict.bean.dos.DictValueEntity;
import com.zlz.open.dict.bean.vo.DictGroupResponse;
import com.zlz.open.dict.bean.vo.DictValueResponse;

/**
 * @author zlz
 * @date 2025/3/3 08:54:20
 * @description
 */
public class DictTransfer {

    public static DictGroupResponse transfer(DictGroupEntity entity) {
        DictGroupResponse dictGroupResponse = new DictGroupResponse();
        dictGroupResponse.setId(entity.getId());
        dictGroupResponse.setCode(entity.getCode());
        dictGroupResponse.setNote(entity.getNote());
        dictGroupResponse.setStatus(entity.getStatus());
        dictGroupResponse.setIsDefault(entity.getIsDefault());
        dictGroupResponse.setIsDeleted(entity.getIsDeleted());
        dictGroupResponse.setCreateTime(entity.getCreatedTime());
        dictGroupResponse.setLastModifiedTime(entity.getLastModifiedTime());
        return dictGroupResponse;
    }

    public static DictValueResponse transfer(DictValueEntity entity) {
        DictValueResponse dictValueResponse = new DictValueResponse();
        dictValueResponse.setId(entity.getId());
        dictValueResponse.setKey(entity.getKey());
        dictValueResponse.setValue(entity.getValue());
        dictValueResponse.setType(entity.getType());
        dictValueResponse.setNote(entity.getNote());
        dictValueResponse.setStatus(entity.getStatus());
        dictValueResponse.setIsDeleted(entity.getIsDeleted());
        dictValueResponse.setCreateTime(entity.getCreatedTime());
        dictValueResponse.setLastModifiedTime(entity.getLastModifiedTime());
        return dictValueResponse;
    }
}
